//
//  HTPaymentCountDownButton.h
//  HTPaymentCountDownButton
//

//  获取效验码按钮

#import <UIKit/UIKit.h>
#import "PayHeaderFile.h"
@class HTPaymentCountDownButton;
typedef NSString* (^CountDownChanging)(HTPaymentCountDownButton *HTPaymentCountDownButton,NSUInteger second);
typedef NSString* (^CountDownFinished)(HTPaymentCountDownButton *HTPaymentCountDownButton,NSUInteger second);

typedef void (^TouchedHTPaymentCountDownButtonHandler)(HTPaymentCountDownButton *HTPaymentCountDownButton,NSInteger tag);


@interface HTPaymentCountDownButton : UIButton
{
    NSInteger _second;
    NSUInteger _totalSecond;
    
    NSTimer *_timer;
    NSDate *_startDate;
    
    CountDownChanging _countDownChanging;
    CountDownFinished _countDownFinished;
    TouchedHTPaymentCountDownButtonHandler _touchedHTPaymentCountDownButtonHandler;
}
@property(nonatomic,strong) id userInfo;

-(void)HTPaymentCountDownButtonHandler:(TouchedHTPaymentCountDownButtonHandler)touchedHTPaymentCountDownButtonHandler;
-(void)countDownChanging:(CountDownChanging)countDownChanging;
-(void)countDownFinished:(CountDownFinished)countDownFinished;

-(void)startCountDownWithSecond:(NSUInteger)second;
-(void)stopCountDown;
@end
